Skip to content

Conversation

@yeonjuan
Copy link
Owner

Checklist

Description

@yeonjuan yeonjuan requested a review from Copilot November 21, 2025 14:09
Copilot finished reviewing on behalf of yeonjuan November 21, 2025 14:13
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements a new templateIndentBase option for the indent rule, providing more flexible indentation control for HTML in template literals. When set to "first", it bases indentation on the first HTML element in the template rather than the template tag itself, which is useful when template literals are indented at varying levels.

  • Added templateIndentBase option with values "templateTag" (default) and "first"
  • Implemented getAutoBaseSpaces() to calculate base indentation from the first element
  • Updated createIndentVisitor() to accept and apply base space offset

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
packages/eslint-plugin/lib/rules/indent/indent.js Implements the core logic for the new templateIndentBase option, including schema definition, base space calculation, and indentation adjustment
packages/eslint-plugin/tests/rules/indent.test.js Adds comprehensive test coverage for the new option with both valid and invalid cases
docs/rules/indent.md Documents the new option with clear descriptions of both "templateTag" and "first" modes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@yeonjuan yeonjuan requested a review from Copilot November 21, 2025 14:40
Copilot finished reviewing on behalf of yeonjuan November 21, 2025 14:43
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link

codecov bot commented Nov 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.70%. Comparing base (56d2df1) to head (45b7d62).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #451   +/-   ##
=======================================
  Coverage   98.69%   98.70%           
=======================================
  Files          85       85           
  Lines        2769     2790   +21     
  Branches      759      764    +5     
=======================================
+ Hits         2733     2754   +21     
  Misses         36       36           
Flag Coverage Δ
unittest 98.70% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
packages/eslint-plugin/lib/rules/indent/indent.js 99.50% <100.00%> (+0.05%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] add an option to ignore starting tabs

2 participants